Redesign light music delete base behavior - #49
Closed
garado wants to merge 6 commits into
Closed
Conversation
when run with no flags: - it will fzf your search query against title, album, artist for every track in the library - it will show confirmation screen with the matches; you can pick Y/N to proceed with or cancel the operation, or you can press P to enter an interactive picker where you can fine-tune the selection.
There was a problem hiding this comment.
Pull request overview
This PR redesigns the light music delete command to support fuzzy matching across track metadata and (optionally) an interactive selection/confirmation flow, updating project dependencies to support the new UX.
Changes:
- Add fuzzy scoring/filtering utilities (RapidFuzz) and interactive pick/confirm helpers (InquirerPy).
- Update
light music deleteto use fuzzy matching by default, with--interactivefor manual selection and a repick confirmation loop. - Update dependency declarations/lockfile and Nix flake inputs to include the new libraries.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Adds locked packages for rapidfuzz, inquirerpy, and transitive deps (prompt-toolkit, pfzy, wcwidth). |
light_cli_tui/pyproject.toml |
Declares new runtime deps: rapidfuzz and inquirerpy. |
light_cli_tui/light_cli_tui/interactive.py |
Introduces interactive fuzzy-pick and confirm-with-repick helpers for CLI flows. |
light_cli_tui/light_cli_tui/fuzzy.py |
Adds fuzzy scoring/filtering utilities used by delete selection. |
light_cli_tui/light_cli_tui/cli.py |
Reworks music delete to use fuzzy selection + interactive confirmation; adds --interactive. |
flake.nix |
Updates Nix packaging/devShell Python deps for the new interactive/fuzzy functionality. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+23
to
+25
| query_lower = query.lower() | ||
| if any(query_lower in field.lower() for field in fields): | ||
| return 100.0 |
Comment on lines
+125
to
+129
| repicked = repick() | ||
| if not repicked: | ||
| console.print("[yellow]Aborted.[/yellow]") | ||
| return None | ||
| selected = repicked |
Comment on lines
+476
to
+480
| selected = fuzzy_pick_best( | ||
| songs, | ||
| tracks, | ||
| fields=lambda t: (t.title, t.artist, t.album), | ||
| id_key=lambda t: t.audio_id, |
Comment on lines
+67
to
+68
| questionary | ||
| rapidfuzz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.